import http from '@/utils/http'
/**
 * 人员组织树
 * @param {*} params
 * @returns
 */
export function fetchUserGroup(params) {
    return http({
        url: '/v2/user/group',
        method: 'get',
        params: params
    })
}
/**
 * 人员列表
 * @param {*} params
 * @returns
 */
export function fetchUserBasic(params) {
    return http({
        url: '/v2/user/basic',
        method: 'get',
        params: params
    })
}
/**
 * 创建人员组织
 * @param {*} params
 * @returns
 */
export function fetchCreateGroup(params) {
    return http({
        url: '/v2/user/createGroup',
        method: 'post',
        data: params
    })
}
/**
 * 删除人员组织
 * @param {*} params
 * @returns
 */
export function fetchRemoveGroup(params) {
    return http({
        url: '/v2/user/removeGroup',
        method: 'post',
        data: params
    })
}
/**
 * 创建编辑人员
 * @param {*} params
 * @returns
 */
export function fetchCreateUser(params) {
    return http({
        url: '/v2/user/create',
        method: 'post',
        data: params
    })
}
/**
 * @description: 删除人员
 * @param {*} params
 * @returns
 */
export function fetchUserRemove(params) {
    return http({
        url: '/v2/user/remove',
        method: 'post',
        data: params
    })
}
/**
 * @description: 切换人员组织
 * @param {*} params
 * @returns
 */
export function fetchUserSwitch(params) {
    return http({
        url: '/v2/user/switch',
        method: 'post',
        data: params
    })
}
/**
 * @description: 导出人员
 * @param {*} params
 * @returns
 */
export function fetchUserExport(params) {
    return http({
        url: '/v2/user/export',
        method: 'post',
        responseType: 'blob',
        params: params
    })
}
/**
 * @description: 导出人员头像
 * @param {*} params
 * @returns
 */
export function fetchUserExportAvatar(params) {
    return http({
        url: '/v2/user/exportAvatarZip',
        method: 'post',
        responseType: 'blob',
        params: params
    })
}
/**
 * @description: 全部人员
 * @param {*} params
 * @returns
 */
export function fetchUserAll(params) {
    return http({
        url: '/v2/user/all',
        method: 'get',
        params: params
    })
}
